package ua.kpi.JavaTraning5;

import junit.framework.Assert;
import org.junit.Test;

import static ua.kpi.JavaTraning5.Palindrome.getAllPalindromes;
import static ua.kpi.JavaTraning5.Palindrome.getPreviousPalindrome;

/**
 * This class includes methods for testing LongDivision class.
 *
 * @author Vitaliy Vasylenko <apa4i007@gmail.com>
 * @version 1.1
 * @since 2013-05-22
 */
public class PalindromeTest {
    @Test
    public void testGetAllPalindromes() throws Exception {
        Assert.assertEquals(getAllPalindromes("tenet").length(),10);
    }



    @Test
    public void testGetPreviousPalindrome() throws Exception {
        Assert.assertEquals(getPreviousPalindrome("ene","ene",2).length(),3);
        Assert.assertEquals(getPreviousPalindrome("tenet","ene",2).length(),13);
    }
}
